FROM node:14-alpine AS builder
WORKDIR app
COPY . .
RUN apk add git && npm config set registry https://registry.npmmirror.com \
    && npm config set disturl https://npmmirror.com/dist \
    && npm config set sass_binary_site https://npmmirror.com/mirrors/node-sass/ \
    && npm ci && npm run build

FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html

EXPOSE 80
